USE [master]
GO

/****** Object:  Database [Dosvid_Site]    Script Date: 08/09/2011 20:38:25 ******/
CREATE DATABASE [Dosvid_Site] ON  PRIMARY 
( NAME = N'Dosvid_Site', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\Dosvid_Site.mdf' , SIZE = 15616KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
 LOG ON 
( NAME = N'Dosvid_Site_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\Dosvid_Site_1.LDF' , SIZE = 7040KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO

ALTER DATABASE [Dosvid_Site] SET COMPATIBILITY_LEVEL = 100
GO

IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [Dosvid_Site].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO

ALTER DATABASE [Dosvid_Site] SET ANSI_NULL_DEFAULT OFF 
GO

ALTER DATABASE [Dosvid_Site] SET ANSI_NULLS OFF 
GO

ALTER DATABASE [Dosvid_Site] SET ANSI_PADDING OFF 
GO

ALTER DATABASE [Dosvid_Site] SET ANSI_WARNINGS OFF 
GO

ALTER DATABASE [Dosvid_Site] SET ARITHABORT OFF 
GO

ALTER DATABASE [Dosvid_Site] SET AUTO_CLOSE ON 
GO

ALTER DATABASE [Dosvid_Site] SET AUTO_CREATE_STATISTICS ON 
GO

ALTER DATABASE [Dosvid_Site] SET AUTO_SHRINK OFF 
GO

ALTER DATABASE [Dosvid_Site] SET AUTO_UPDATE_STATISTICS ON 
GO

ALTER DATABASE [Dosvid_Site] SET CURSOR_CLOSE_ON_COMMIT OFF 
GO

ALTER DATABASE [Dosvid_Site] SET CURSOR_DEFAULT  GLOBAL 
GO

ALTER DATABASE [Dosvid_Site] SET CONCAT_NULL_YIELDS_NULL OFF 
GO

ALTER DATABASE [Dosvid_Site] SET NUMERIC_ROUNDABORT OFF 
GO

ALTER DATABASE [Dosvid_Site] SET QUOTED_IDENTIFIER OFF 
GO

ALTER DATABASE [Dosvid_Site] SET RECURSIVE_TRIGGERS OFF 
GO

ALTER DATABASE [Dosvid_Site] SET  DISABLE_BROKER 
GO

ALTER DATABASE [Dosvid_Site] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 
GO

ALTER DATABASE [Dosvid_Site] SET DATE_CORRELATION_OPTIMIZATION OFF 
GO

ALTER DATABASE [Dosvid_Site] SET TRUSTWORTHY OFF 
GO

ALTER DATABASE [Dosvid_Site] SET ALLOW_SNAPSHOT_ISOLATION OFF 
GO

ALTER DATABASE [Dosvid_Site] SET PARAMETERIZATION SIMPLE 
GO

ALTER DATABASE [Dosvid_Site] SET READ_COMMITTED_SNAPSHOT OFF 
GO

ALTER DATABASE [Dosvid_Site] SET HONOR_BROKER_PRIORITY OFF 
GO

ALTER DATABASE [Dosvid_Site] SET  READ_WRITE 
GO

ALTER DATABASE [Dosvid_Site] SET RECOVERY SIMPLE 
GO

ALTER DATABASE [Dosvid_Site] SET  MULTI_USER 
GO

ALTER DATABASE [Dosvid_Site] SET PAGE_VERIFY CHECKSUM  
GO

ALTER DATABASE [Dosvid_Site] SET DB_CHAINING OFF 
GO


if not exists(SELECT 1
     FROM [dbo].[sysusers]
     where [name] = 'WorkUser')
begin
 CREATE USER WorkUser FOR LOGIN WorkUser
 EXEC sp_addrolemember N'db_owner', N'WorkUser'
end